package com.itbaizhan.openhis.fegin;


import com.itbaizhan.openhis.api.domain.User;
import com.itbaizhan.openhis.constant.SecurityConstants;
import com.itbaizhan.openhis.domain.R;
import com.itbaizhan.openhis.model.LoginUser;
import com.itbaizhan.openhis.vo.AjaxResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 用户服务
 *
 * @author ruoyi
 */
@FeignClient(name = "his-system-service")
public interface RemoteUserService
{
    /**
     * 通过用户名查询用户信息
     *
     * @param username 用户名
     * @return 结果
     */
    @GetMapping("/system/user/user/info/{username}")
    R<User> getUserInfo(@PathVariable("username") String username);

    /**
     * 注册用户信息
     *
     * @param sysUser 用户信息
     * @param source 请求来源
     * @return 结果
     */
    @PostMapping("/user/register")
     R registerUserInfo(@RequestBody User sysUser, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}
